package com.example.userprovider.controller;

import com.example.goodscommons.pojo.User;
import com.example.userprovider.dao.UserDao;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/user")
public class UserController {

    @Resource
    private UserDao userDao;

    @RequestMapping("/list")
    public List<User> list(){
        return  userDao.getUserList();
    }

}
